You are not logged in Log in Join
You are here: Home » Members » ajung » howto » How to use non-ascii charactersets together with Strucutured Text

Log in
Name

Password

 

How to use non-ascii charactersets together with Strucutured Text

Locale Support for Structured Text

This How-To describes how to use the StructuredText component of Zope with locale support (non-ascii character sets).

Setting up your locale environment

Locale support under Unix is usually enabled by setting one or more related environment variables. The most common way is something like:

    bash: export LC_ALL="de_DE"
    tcsh: setenv LC_ALL de_DE

Starting Zope with locale support

To enable Zope with locale support it is neccessary to start Zope with the -L option:

     ./start <your args> -L ""

You can specify a different locale by passing it with the -L option e.g.:

      ./start <your_args> -L "fr_FR"

Using the StructuredText package standalone

When using StructuredText outside Zope it is neccessary to enable locale support before you import the StructuredText module:

    import locale
    locale.setlocale(locale.LC_ALL,"")
    from StructuredText.StructuredText import HTML
    print HTML("......")